<template>
    <div class="child2">
        <h1>同时绑定多个v-model</h1>
        <button @click="handler">pageNo{{ pageNo }}</button>
        <button @click="$emit('update:pageSize', pageSize + 4)">
            pageSize{{ pageSize }}
        </button>
    </div>
</template>

<script setup lang="ts">
  let props = defineProps(["pageNo", "pageSize"]);
  let $emit = defineEmits(["update:pageNo", "update:pageSize"]);
  //第一个按钮的事件回调
  const handler = () => {
    $emit("update:pageNo", props.pageNo + 3);
  };
</script>

<style scoped>
    .child2 {
        width: 300px;
        height: 300px;
        background: hotpink;
    }
</style>